An Experiment in Abstract Machine Design
نویسنده
چکیده
SUMMARY In this article we present Typed Feature Structures as an extension of Prolog, and show how to come up with a compilation scheme and an abstract machine using a design methodology based on partial evaluation. First we define the transformations used by our partial evaluator. Then we present the design methodology which we will use later. Next, we clarify the notion of Typed Feature Structures that underlies our work, and formally define the unification of such structures. Based on this definition, we develop a unification procedure with explicit heap representation. By partially evaluating this procedure with respect to some example programs, we show how to come up with the machine instructions and translation schemes. Finally, we briefly address coreferences, cyclic structures and the unification of types. INTRODUCTION The more programming languages are freed from the 'Von-Neumann style', the more important are abstract machines. Abstract machines provide an intermediate target language for compilation. First, the compiler generates code for the abstract machine, then this code can be further compiled into real machine code or it can be interpreted. By dividing compilation into two stages, abstract machines increase the portability and maintainability of compilers. For compiling Prolog, and as a basis for compilers of other logic programming languages, the Warren Abstract Machine (WAM) is widely used. Peter Kursawe 1 shows how some of the WAM instructions for unification , originally invented by Warren, 2 can be reinvented by using partial evaluation. Later, Nilsson 3,4 derived some of the control instructions of the WAM in a similar way. To our knowledge, we are the first to use this methodology to 'invent' WAM-like instructions, not 'reinvent' WAM instructions. Moreover, the methodology both guides the design and relates source language constructs to machine instructions. Although the methodology has only been applied in the context of logic programming, we are convinced that it can be applied to other languages, too. For example, it is not difficult to design some of the P-machine instructions by applying the methodology to an interpreter for arithmetic expressions. In the following sections we apply the methodology to come up with machine instructions for Typed Feature Structures. These are an extension of first-order terms in Prolog. Basically, we allow structures and predicates to have typed and labelled
منابع مشابه
Design, Development and Evaluation of an Orange Sorter Based on Machine Vision and Artificial Neural Network Techniques
ABSTRACT- The high production of orange fruit in Iran calls for quality sorting of this product as a requirement for entering global markets. This study was devoted to the development of an automatic fruit sorter based on size. The hardware consisted of two units. An image acquisition apparatus equipped with a camera, a robotic arm and controller circuits. The second unit consisted of a robotic...
متن کاملExperimental Study of Effective Parameters on Honing Process of Cast Iron Cylinder
Honing is a process for finishing surfaces to obtain smooth surface. This process is used for final polish of inner parts such as engines cylinders. Optimizing this process has always been a big challenge for mass production of cylinder blocks of internal combustion engines. Honing process has some variable parameters, thus to get their optimum rates the automobile cylinders were tested. In thi...
متن کاملExperimental Study of Effective Parameters on Honing Process of Cast Iron Cylinder
Honing is a process for finishing surfaces to obtain smooth surface. This process is used for final polish of inner parts such as engines cylinders. Optimizing this process has always been a big challenge for mass production of cylinder blocks of internal combustion engines. Honing process has some variable parameters, thus to get their optimum rates the automobile cylinders were tested. In thi...
متن کاملExperimental Investigation of Surface Roughness and Kerf Width During Machining of Blanking Die Material on Wire Electric Discharge Machine
Wire electric discharge machine (WEDM) is spark erosion in unconventional machining technique to cut hard and the conductive material with a wire as an electrode. The blanking die material SKD 11 is a high carbon and high chromium tool steel with high hardness and high wearing resistance property. This tool steel has broad application in press tools and dies making industries. In this research ...
متن کاملA Comprehensive Mathematical Model for the Design of a Dynamic Cellular Manufacturing System Integrated with Production Planning and Several Manufacturing Attributes
Dynamic cellular manufacturing systems, Mixed-integer non-linear programming, Production planning, Manufacturing attributes This paper presents a novel mixed-integer non-linear programming model for the design of a dynamic cellular manufacturing system (DCMS) based on production planning (PP) decisions and several manufacturing attributes. Such an integrated DCMS model with an extensi...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Softw., Pract. Exper.
دوره 27 شماره
صفحات -
تاریخ انتشار 1997